//
//  UIView+BarHairLineView.m
//  INMOTION
//
//  Created by Kyle Sun on 11/17/15.
//  Copyright © 2015 Inmotion. All rights reserved.
//

#import "UIView+BarHairLineView.h"

@implementation UIView (BarHairLineView)

- (UIImageView *)hairlineImageViewInView:(UIView *)view {
    if ([view isKindOfClass:UIImageView.class] && view.bounds.size.height <= 1.0) {
        return (UIImageView *)view;
    }
    for (UIView *subview in view.subviews) {
        UIImageView *imageView = [self hairlineImageViewInView:subview];
        if (imageView) {
            return imageView;
        }
    }
    return nil;
}

@end
